package com.demo.studentmanager.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.demo.studentmanager.dao.TeacherMapper;
import com.demo.studentmanager.dto.TeacherListDto;
import com.demo.studentmanager.entity.Teacher;
import com.demo.studentmanager.service.ITeacherService;
import com.demo.studentmanager.vo.TeacherVo;
import org.springframework.stereotype.Service;

/**
 * @author zjia
 */
@Service
public class TeacherServiceImpl extends ServiceImpl<TeacherMapper, Teacher> implements ITeacherService {

    @Override
    public IPage<TeacherVo> getTeacherList(TeacherListDto teacherListDto) {

        IPage<TeacherVo> page = new Page<>(teacherListDto.getCurrent(), teacherListDto.getSize());
        return baseMapper.getTeacherList(page, teacherListDto);
    }

}
